package com.lxmes.pm.service.impl;

import java.util.List;
import com.lxmes.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lxmes.pm.mapper.ARewardInfoMapper;
import com.lxmes.pm.domain.ARewardInfo;
import com.lxmes.pm.service.IARewardInfoService;

/**
 * 成果奖励Service业务层处理
 * 
 * @author zhangzhiyu
 * @date 2023-04-04
 */
@Service
public class ARewardInfoServiceImpl implements IARewardInfoService 
{
    @Autowired
    private ARewardInfoMapper aRewardInfoMapper;

    /**
     * 查询成果奖励
     * 
     * @param id 成果奖励主键
     * @return 成果奖励
     */
    @Override
    public ARewardInfo selectARewardInfoById(Long id)
    {
        return aRewardInfoMapper.selectARewardInfoById(id);
    }

    /**
     * 查询成果奖励列表
     * 
     * @param aRewardInfo 成果奖励
     * @return 成果奖励
     */
    @Override
    public List<ARewardInfo> selectARewardInfoList(ARewardInfo aRewardInfo)
    {
        return aRewardInfoMapper.selectARewardInfoList(aRewardInfo);
    }

    /**
     * 新增成果奖励
     * 
     * @param aRewardInfo 成果奖励
     * @return 结果
     */
    @Override
    public int insertARewardInfo(ARewardInfo aRewardInfo)
    {
        aRewardInfo.setCreateTime(DateUtils.getNowDate());
        return aRewardInfoMapper.insertARewardInfo(aRewardInfo);
    }

    /**
     * 修改成果奖励
     * 
     * @param aRewardInfo 成果奖励
     * @return 结果
     */
    @Override
    public int updateARewardInfo(ARewardInfo aRewardInfo)
    {
        aRewardInfo.setUpdateTime(DateUtils.getNowDate());
        return aRewardInfoMapper.updateARewardInfo(aRewardInfo);
    }

    /**
     * 批量删除成果奖励
     * 
     * @param ids 需要删除的成果奖励主键
     * @return 结果
     */
    @Override
    public int deleteARewardInfoByIds(Long[] ids)
    {
        return aRewardInfoMapper.deleteARewardInfoByIds(ids);
    }

    /**
     * 删除成果奖励信息
     * 
     * @param id 成果奖励主键
     * @return 结果
     */
    @Override
    public int deleteARewardInfoById(Long id)
    {
        return aRewardInfoMapper.deleteARewardInfoById(id);
    }
}
